package com.notecalendar.beans;

import java.io.Serializable;
import java.math.BigInteger;
import java.util.List;

import com.evernote.edam.type.Note;
import com.evernote.edam.type.Notebook;
import com.notecalendar.model.Alarm_Types;
import com.notecalendar.quartz.exception.QuartzActionException;

/**
 * Bean for store and manipulate all data about evernote
 * @author angelcereijo
 *
 */
public class Evernote implements Serializable{
	
	/**
	 * 
	 */
	private static final long serialVersionUID = -854483088651591021L;
	
	//Evernote actions
	public static final int EVERNOTE_CREATE_NOTE = 0;
	public static final int EVERNOTE_CREATE_NOTEBOOK = 1;
	public static final int EVERNOTE_DELETE_NOTE = 2;
	public static final int EVERNOTE_SHARE_NOTE = 3;
	public static final int EVERNOTE_SHARE_NOTEBOOK = 4;
	public static final int EVERNOTE_UNSHARE_NOTE = 5;
	public static final int EVERNOTE_UNSHARE_NOTEBOOK = 6;
	
	
	
	//id for the user of evernote in notecalendar system
	private BigInteger evernote_id;
	
	//Note information
	private Note note;
	//Notebook information
	private Notebook notebook;
	
	
	//Information to send a note for email
	private EvernoteEmail evernoteEmail;
	//List of diferentes alarms
	private List<Alarm_Types> listAlarmTypes;
	/**
	 * Action to execute in evernote system
	 */
	private int evernoteAction = Evernote.EVERNOTE_CREATE_NOTE;
	
	
	
	public int getEvernoteAction() {
		return evernoteAction;
	}
	public void setEvernoteAction(int evernoteAction) throws QuartzActionException{
		switch(evernoteAction){
			case EVERNOTE_CREATE_NOTE:break;
			case EVERNOTE_CREATE_NOTEBOOK:break;
			case EVERNOTE_DELETE_NOTE:break;
			case EVERNOTE_SHARE_NOTE:break;
			case EVERNOTE_SHARE_NOTEBOOK:break;
			case EVERNOTE_UNSHARE_NOTE:break;
			case EVERNOTE_UNSHARE_NOTEBOOK:break;
			default: throw new QuartzActionException(QuartzActionException.NOT_SUPPORTED_ACTION);
			
		}
		this.evernoteAction = evernoteAction;
	}
	
	
	public void setEvernote_id(BigInteger evernote_id) {
		this.evernote_id = evernote_id;
	}
	public BigInteger getEvernote_id() {
		return evernote_id;
	}
	
	public Note getNote() {
		return note;
	}
	public void setNote(Note note) {
		this.note = note;
	}
	
	public EvernoteEmail getEvernoteEmail() {
		return evernoteEmail;
	}
	public void setEvernoteEmail(EvernoteEmail evernoteEmail) {
		this.evernoteEmail = evernoteEmail;
	}
	
	public void setListAlarmTypes(List<Alarm_Types> listAlarmTypes) {
		this.listAlarmTypes = listAlarmTypes;
	}
	public List<Alarm_Types> getListAlarmTypes() {
		return listAlarmTypes;
	}
	
	public Notebook getNotebook() {
		return notebook;
	}
	public void setNotebook(Notebook notebook) {
		this.notebook = notebook;
	}
	
	
}
